5.6 Writing a program

Only after all of the preceding operations have been completed can we start writing a program. Since a simple program has already been written in "Assembly Language Programming" section of the book, so we will use that same program here, too.

Program has to be copied to a window that's opened, or copied from a disc, or taken from MikroElektronika Internet presentation using options copy and paste. When the program is copied to "proba.asm" window, we can use PROJECT -> BUILD ALL command (if there were no errors), and a new window will appear as in the next picture.

Window with messages following a translation of assembler program

We can see from the picture that we get "proba.hex" file as a result of translation process, that MPASMWIN program is used for translation, and that there is one message. In all that information, the last sentence in the window is the most important one because it shows whether translation was successful or not. 'Build completed successfully' is a message stating that translation was successful and that there were no errors.

In case an error shows up, we need to double click on error message in 'Build Results' window. This will automatically transfers you to assembler program and to the line where the error is.